//
//  Common.swift
//  LKWeibo
//
//  Created by like on 16/8/10.
//  Copyright © 2016年 like. All rights reserved.
//
  //全局，相当于OC中的PCH文件
import UIKit


//屏幕的宽  高

let SCREENW = UIScreen.mainScreen().bounds.width
let SCREENH = UIScreen.mainScreen().bounds.height

// 切换根控制器通知名字
let WBSWITCHROOTVCNOTIFICATION = "WBSWITCHROOTVCNOTIFICATION"

// 微博账号
let WBName = "like359881584@163.com"
let WBPassWd = "like4492399"
// 微博相关信息
let WBAppKey = "2195851910"
let WBAppSecret = "2d48cd977cd1c348675cf63aa99c9e5f"
let WBRedirect_uri = "http://www.baidu.com"


//主题颜色
let appThemeColor = UIColor.orangeColor()

//设置RGB颜色的
func RGB(red: CGFloat, green: CGFloat, blue: CGFloat, alpha: CGFloat = 1)->UIColor{
    return UIColor(red: red/255, green: green/255, blue: blue/255, alpha: alpha)
}


//随机颜色的
func RandomColor()->UIColor{
    let r = CGFloat(random()%256)
    let g = CGFloat(random()%256)
    let b = CGFloat(random()%256)
    
   return RGB(r, green: g, blue: b)
}

func printLog<T>(message: T, file: String = #file, function: String = #function,line: Int =  #line){
//    #if DEBUG
        let newFile = (file as NSString).lastPathComponent
        let result = "\(newFile) 第[\(line)]行: \(message)"
        print(result)
//    #endif
}
